//
// Created by xili on 2024/8/26 15:11.
// GO BIG OR GO HOME.
//
#include "leetcode.h"

class Solution {
public:
    int getMaximumConsecutive(vector<int> &coins) {
        int res = 1;
        sort(coins.begin(), coins.end());
        for (auto &i: coins) {
            if (i > res) {
                break;
            }
            res += i;
        }
        return res;
    }
};
 